<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<style>
		#list{
            display: none;
			width: 200px;
			background-color: pink;
		}
		.show{
			display: block;
		}
	</style>
</head>
<body>
	<button id="btn">下拉切换</button>
	<ul id="list" style="color:#fff">
		<li>1</li>
		<li>2</li>
		<li>3</li>
		<li>4</li>
		<li>5</li>
	</ul>
	<script>
		var btn = document.getElementById("btn");
		var list = document.getElementById("list");
		btn.onclick = function(){
			var theCSSprop = window.getComputedStyle(list,null).getPropertyValue("display");
            if(theCSSprop=="block"){
                list.style.display = "none";
            }else{                
                list.style.display = "block";
            }
		}
	</script>
</body>
</html>
